package com.stockz.equity.model;

import java.io.Serializable;
import java.util.Date;


public class BarPrimaryKey implements Serializable{
	private static final long serialVersionUID = -4492952451298457464L;

	private String scripCode;
	private Date date;
	
	@Override
	public boolean equals(Object obj) {
		if(obj != null 
				&& obj.getClass().isAssignableFrom(getClass())){
			BarPrimaryKey b = (BarPrimaryKey)obj;
			if(b.getDate().equals(getDate()) 
					&& b.getScripCode().equals(getScripCode())){
				return true;
			}
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		return super.hashCode();
	}
	
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}

	public String getScripCode() {
		return scripCode;
	}

	public void setScripCode(String scripCode) {
		this.scripCode = scripCode;
	}

}
